package com.cymal.condition;


import com.cymal.entity.po.subject.AbstractSubject;

import java.util.Collection;

/**
 * 条件构造器
 * @param <Subject> 题目
 * @param <Req> 请求
 */
public interface Condition<Subject extends AbstractSubject, Req> {


    /**
     * 根据请求, 构造条件, 匹配结果.
     * @param subject 题目.
     * @param requests 请求.
     * @return ture or false.
     */
    Boolean matched(Subject subject, Req ... requests);


    /**
     * 根据请求, 构造条件, 匹配结果.
     * @param subject 题目.
     * @param requests 请求.
     * @return ture or false.
     */
    Boolean matched(Subject subject, Collection<Req> requests);


    /**
     * 返回类型
     * @return 类型
     */
    AbstractSubject.SubjectType conditionType();



}
